package sv.gob.mh.dgii.model.pojos.ruc;

import java.io.Serializable;
import javax.validation.constraints.NotNull;
import sv.gob.mh.dgii.model.TbTipoContrib;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.NotEmpty;
import sv.gob.mh.dgii.model.validators.CheckSNombres;
  
public class A implements Serializable {

    private static final long serialVersionUID = 1L;
	
    @Pattern(regexp="[\\u00C0-\\u00FF\\\\[a-z-A-Z ]\\\\s\\\\p{Punct}&&[^#]]*")
    @NotEmpty
    private String s1apeRasoc;
    
    @Pattern(regexp="[\\u00C0-\\u00FF\\\\[a-z-A-Z ]\\\\s\\\\p{Punct}&&[^#]]*")    
    private String s2apeAbrev;
    
    @Pattern(regexp="[\\u00C0-\\u00FF\\\\[a-z-A-Z ]\\\\s\\\\p{Punct}&&[^#]]*")
    @NotEmpty(groups = CheckSNombres.class)
    private String snombres;
    
    @Pattern(regexp="^[M|F]$")
    private String msexo;
    
    @NotNull
    private TbTipoContrib tbTipoContrib;
    
    @Pattern(regexp="[\\u00C0-\\u00FF\\\\[a-z-A-Z ]\\\\s\\\\p{Punct}&&[^#]]*")
    private String nomComercial;
    

    public A(){}
    
    public A(F210 f210) {
    	this.s1apeRasoc = f210.getS1apeRasoc();
    	this.s2apeAbrev = f210.getS2apeAbrev();
    	this.snombres = f210.getSnombres();
    	this.msexo = f210.getMsexo();
    	this.tbTipoContrib = f210.getTbTipoContrib();
    	this.nomComercial = f210.getNomComercial();    	
    }
    
	public String getS1apeRasoc() {
		return s1apeRasoc;
	}
	public void setS1apeRasoc(String s1apeRasoc) {
		this.s1apeRasoc = s1apeRasoc;
	}
	public String getS2apeAbrev() {
		return s2apeAbrev;
	}
	public void setS2apeAbrev(String s2apeAbrev) {
		this.s2apeAbrev = s2apeAbrev;
	}
	public String getSnombres() {
		return snombres;
	}
	public void setSnombres(String snombres) {
		this.snombres = snombres;
	}
	public String getMsexo() {
		return msexo;
	}
	public void setMsexo(String msexo) {
		this.msexo = msexo;
	}
	public TbTipoContrib getTbTipoContrib() {
		return tbTipoContrib;
	}
	public void setTbTipoContrib(TbTipoContrib tbTipoContrib) {
		this.tbTipoContrib = tbTipoContrib;
	}
	public String getNomComercial() {
		return nomComercial;
	}
	public void setNomComercial(String nomComercial) {
		this.nomComercial = nomComercial;
	}	
}
